package com.software.loginregister.entity;

import lombok.Data;

@Data
public class ChatMessage {
    private String message;
    private boolean isUser; // true表示用户消息，false表示AI消息
    private long timestamp;
    private String avatarUrl;


    public ChatMessage(String message, boolean isUser,String avatarUrl) {
        this.message = message;
        this.isUser = isUser;
        this.timestamp = System.currentTimeMillis();
        this.avatarUrl = avatarUrl;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isUser() {
        return isUser;
    }
    public String getAvatarUrl() {
        return avatarUrl;
    }

    public long getTimestamp() {
        return timestamp;
    }
}